#define _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
#include "gtest/gtest.h"

#include <iostream>
using std::cout;
using std::endl;

#include <sstream>
using std::ostringstream;

#include "../../include/container/vector.hpp"
#include "../../include/container/list.hpp"
#include "../../include/container/deque.hpp"
#include "../../include/container/stack.hpp"
#include "../../include/container/queue.hpp"

#include "../../include/test/noTrivalClass.hpp"

#include "../../include/container/array.hpp"
#include "../../include/algorithm/easy_dump.hpp"
#include "../../include/functor/functor_ease_dump.hpp"
#include "../../include/functor/hashfunc.hpp"

#include "../../include/container/hashtable.hpp"
#include "../../include/container/unordered_set.hpp"
#include "../../include/container/unordered_map.hpp"

#include "../../include/container/RBtree.hpp"
#include "../../include/container/set.hpp"
#include "../../include/container/map.hpp"

TEST(MapTest, MapTestCommon) {
	bla::map<int, std::string> us;
	EXPECT_EQ(us.find(1), false);
	us.insert(std::pair<int, std::string>(1, "abcde"));
	EXPECT_EQ(us.find(1), true);
	EXPECT_EQ(us.at(1), std::string("abcde"));
	EXPECT_EQ(us.at(1), "abcde");
	us.insert(std::pair<int, std::string>(2, "aaaaa"));
	EXPECT_EQ(us.find(2), true);
	EXPECT_EQ(us.find(3), false);
	ostringstream oss;
	oss << us;
	EXPECT_EQ(oss.str(), "1:abcde 2:aaaaa ");

	us.remove(2);
	EXPECT_EQ(us.find(2), false);
	oss.str("");
	oss << us;
	EXPECT_EQ(oss.str(), "1:abcde ");
	us.insert(std::pair<int, std::string>(3, "daaaaa"));
	EXPECT_EQ(us.size(), 2);

	bla::map<int, std::string> us2 = us;
	oss.str("");
	oss << us2;
	EXPECT_EQ(oss.str(), "1:abcde 3:daaaaa ");
	EXPECT_EQ(us2.size(), 2);

	bla::map<int, std::string> us3(us);
	oss.str("");
	oss << us3;
	EXPECT_EQ(oss.str(), "1:abcde 3:daaaaa ");
	EXPECT_EQ(us3.size(), 2);

	bla::map<int, std::string> us4;
	us4 = us;
	oss.str("");
	oss << us4;
	EXPECT_EQ(oss.str(), "1:abcde 3:daaaaa ");
	EXPECT_EQ(us4.size(), 2);

	for (int i = 0; i < 20; ++i) {
		us.insert(std::pair<int, std::string>(i, std::to_string(i)));
	}
	oss.str("");
	oss << us;
	EXPECT_EQ(oss.str(), "0:0 1:abcde 2:2 3:daaaaa 4:4 5:5 6:6 7:7 8:8 9:9 10:10 11:11 12:12 13:13 14:14 15:15 16:16 17:17 18:18 19:19 ");
	EXPECT_EQ(us.size(), 20);
}

/*
TEST(SetTest, SetTestCommon) {
	bla::set<std::string> s1;
	EXPECT_EQ(s1.size(), 0);
	EXPECT_EQ(s1.insert("abc"), true);
	EXPECT_EQ(s1.insert("abdd"), true);
	EXPECT_EQ(s1.insert("aaaa"), true);
	EXPECT_EQ(s1.insert("aaaa"), false);
	EXPECT_EQ(s1.size(), 3);

	ostringstream oss;
	oss << s1;
	EXPECT_EQ(oss.str(), "aaaa abc abdd ");

	EXPECT_EQ(s1.remove("aaaa"), true);
	EXPECT_EQ(s1.size(), 2);
	EXPECT_EQ(s1.remove("aaaa"), false);

	oss.str("");
	oss << s1;
	EXPECT_EQ(oss.str(), "abc abdd ");
}
*/

/*
TEST(RBTreeTest, RBTreeTestCommon) {
	bla::RBTree<std::string, std::string, bla::_identitySingleFunctor<std::string>,
		bla::_identitySameTypeCompareFunctor<std::string>, bla::_sameTypeLessThanCompareFunctor<std::string>> rb1;
	EXPECT_EQ(rb1.size(), 0);
	EXPECT_EQ(rb1.insert("abc"), true);
	EXPECT_EQ(rb1.insert("abdd"), true);
	EXPECT_EQ(rb1.insert("aaaa"), true);
	EXPECT_EQ(rb1.insert("aaaa"), false);
	EXPECT_EQ(rb1.size(), 3);

	ostringstream oss;
	oss << rb1;
	EXPECT_EQ(oss.str(), "aaaa abc abdd ");

	EXPECT_EQ(rb1.remove("aaaa"), true);
	EXPECT_EQ(rb1.size(), 2);
	EXPECT_EQ(rb1.remove("aaaa"), false);

	oss.str("");
	oss << rb1;
	EXPECT_EQ(oss.str(), "abc abdd ");
}
*/

/*
TEST(UnorderedMapTest, UnorderedMapTestCommon) {
	bla::unordered_map<int, std::string> us;
	EXPECT_EQ(us.find(1), false);
	us.insert(std::pair<int, std::string>(1, "abcde"));
	EXPECT_EQ(us.find(1), true);
	EXPECT_EQ(us.at(1), std::string("abcde"));
	EXPECT_EQ(us.at(1), "abcde");
	us.insert(std::pair<int, std::string>(2, "aaaaa"));
	EXPECT_EQ(us.find(2), true);
	EXPECT_EQ(us.find(3), false);
	ostringstream oss;
	oss << us;
	EXPECT_EQ(oss.str(), "1:abcde 2:aaaaa ");

	us.erase(2);
	EXPECT_EQ(us.find(2), false);
	oss.str("");
	oss << us;
	EXPECT_EQ(oss.str(), "1:abcde ");
	us.insert(std::pair<int, std::string>(3, "daaaaa"));
	EXPECT_EQ(us.size(), 2);
	EXPECT_EQ(us.bucketSize(), 11);

	bla::unordered_map<int, std::string> us2 = us;
	oss.str("");
	oss << us2;
	EXPECT_EQ(oss.str(), "1:abcde 3:daaaaa ");
	EXPECT_EQ(us2.size(), 2);
	EXPECT_EQ(us2.bucketSize(), 11);

	bla::unordered_map<int, std::string> us3(us);
	oss.str("");
	oss << us3;
	EXPECT_EQ(oss.str(), "1:abcde 3:daaaaa ");
	EXPECT_EQ(us3.size(), 2);
	EXPECT_EQ(us3.bucketSize(), 11);

	bla::unordered_map<int, std::string> us4;
	us4 = us;
	oss.str("");
	oss << us4;
	EXPECT_EQ(oss.str(), "1:abcde 3:daaaaa ");
	EXPECT_EQ(us4.size(), 2);
	EXPECT_EQ(us4.bucketSize(), 11);

	for (int i = 0; i < 20; ++i) {
		us.insert(std::pair<int, std::string>(i, std::to_string(i)));
	}
	oss.str("");
	oss << us;
	EXPECT_EQ(oss.str(), "0:0 1:abcde 2:2 3:daaaaa 4:4 5:5 6:6 7:7 8:8 9:9 10:10 11:11 12:12 13:13 14:14 15:15 16:16 17:17 18:18 19:19 ");
	EXPECT_EQ(us.size(), 20);
	EXPECT_EQ(us.bucketSize(), 23);
}
*/

/*
TEST(UnorderedSetTest, UnorderedSetTestCommon) {
	bla::unordered_set<int> us;
	EXPECT_EQ(us.find(1), false);
	us.insert(1);
	EXPECT_EQ(us.find(1), true);
	us.insert(2);
	EXPECT_EQ(us.find(2), true);
	EXPECT_EQ(us.find(3), false);
	ostringstream oss;
	oss << us;
	EXPECT_EQ(oss.str(), "1 2 ");

	us.erase(2);
	EXPECT_EQ(us.find(2), false);
	oss.str("");
	oss << us;
	EXPECT_EQ(oss.str(), "1 ");
	us.insert(3);
	EXPECT_EQ(us.size(), 2);
	EXPECT_EQ(us.bucketSize(), 11);

	bla::unordered_set<int> us2 = us;
	oss.str("");
	oss << us2;
	EXPECT_EQ(oss.str(), "1 3 ");
	EXPECT_EQ(us2.size(), 2);
	EXPECT_EQ(us2.bucketSize(), 11);

	bla::unordered_set<int> us3(us);
	oss.str("");
	oss << us3;
	EXPECT_EQ(oss.str(), "1 3 ");
	EXPECT_EQ(us3.size(), 2);
	EXPECT_EQ(us3.bucketSize(), 11);

	bla::unordered_set<int> us4;
	us4 = us;
	oss.str("");
	oss << us4;
	EXPECT_EQ(oss.str(), "1 3 ");
	EXPECT_EQ(us4.size(), 2);
	EXPECT_EQ(us4.bucketSize(), 11);

	us.insert(1);
	us.insert(8);
	us.insert(10);
	us.insert(14);
	oss.str("");
	oss << us;
	EXPECT_EQ(oss.str(), "1 3 14 8 10 ");
	EXPECT_EQ(us.size(), 5);
	EXPECT_EQ(us.bucketSize(), 11);

	for (int i = 0; i < 20; ++i) {
		us.insert(i);
	}
	oss.str("");
	oss << us;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");
	EXPECT_EQ(us.size(), 20);
	EXPECT_EQ(us.bucketSize(), 23);

	bla::unordered_set<std::string> usstr;
	EXPECT_EQ(usstr.find(std::string("abcde")), false);
	usstr.insert(std::string("abcde"));
	EXPECT_EQ(usstr.find(std::string("abcde")), true);
	usstr.insert(std::string("fuckee"));
	EXPECT_EQ(usstr.find(std::string("fuckee")), true);
	EXPECT_EQ(usstr.find(std::string("fuck")), false);
}
*/

/*
TEST(HashTableTest, HashTableTestCommon) {
	bla::hashtable<int, int, bla::_defhashFunctor<int>,
		bla::_identitySingleFunctor<int>, bla::_identitySameTypeCompareFunctor<int>> hs;
	EXPECT_EQ(hs.find(1), false);
	hs.insert(1);
	EXPECT_EQ(hs.find(1), true);
	hs.insert(2);
	EXPECT_EQ(hs.find(2), true);
	EXPECT_EQ(hs.find(3), false);
	ostringstream oss;
	oss << hs;
	EXPECT_EQ(oss.str(), "1 2 ");

	hs.erase(2);
	EXPECT_EQ(hs.find(2), false);
	oss.str("");
	oss << hs;
	EXPECT_EQ(oss.str(), "1 ");
	hs.insert(3);
	EXPECT_EQ(hs.size(), 2);
	EXPECT_EQ(hs.bucketSize(), 11);

	bla::hashtable<int, int, bla::_defhashFunctor<int>,
		bla::_identitySingleFunctor<int>, bla::_identitySameTypeCompareFunctor<int>> hs2 = hs;
	oss.str("");
	oss << hs2;
	EXPECT_EQ(oss.str(), "1 3 ");
	EXPECT_EQ(hs2.size(), 2);
	EXPECT_EQ(hs2.bucketSize(), 11);

	bla::hashtable<int, int, bla::_defhashFunctor<int>,
		bla::_identitySingleFunctor<int>, bla::_identitySameTypeCompareFunctor<int>> hs3(hs);
	oss.str("");
	oss << hs3;
	EXPECT_EQ(oss.str(), "1 3 ");
	EXPECT_EQ(hs3.size(), 2);
	EXPECT_EQ(hs3.bucketSize(), 11);

	bla::hashtable<int, int, bla::_defhashFunctor<int>,
		bla::_identitySingleFunctor<int>, bla::_identitySameTypeCompareFunctor<int>> hs4;
	hs4 = hs;
	oss.str("");
	oss << hs4;
	EXPECT_EQ(oss.str(), "1 3 ");
	EXPECT_EQ(hs4.size(), 2);
	EXPECT_EQ(hs4.bucketSize(), 11);

	hs.insert(1);
	hs.insert(8);
	hs.insert(10);
	hs.insert(14);
	oss.str("");
	oss << hs;
	EXPECT_EQ(oss.str(), "1 3 14 8 10 ");
	EXPECT_EQ(hs.size(), 5);
	EXPECT_EQ(hs.bucketSize(), 11);

	for (int i = 0; i < 20; ++i) {
		hs.insert(i);
	}
	oss.str("");
	oss << hs;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");
	EXPECT_EQ(hs.size(), 20);
	EXPECT_EQ(hs.bucketSize(), 23);

	bla::hashtable<std::string, std::string, bla::_defhashFunctor<std::string>,
		bla::_identitySingleFunctor<std::string>, bla::_identitySameTypeCompareFunctor<std::string>> hsstr;
	EXPECT_EQ(hsstr.find(std::string("abcde")), false);
	hsstr.insert(std::string("abcde"));
	EXPECT_EQ(hsstr.find(std::string("abcde")), true);
	hsstr.insert(std::string("fuckee"));
	EXPECT_EQ(hsstr.find(std::string("fuckee")), true);
	EXPECT_EQ(hsstr.find(std::string("fuck")), false);
}
*/

/*
TEST(QueueTest, QueueTestCommon) {
	bla::queue<long long> bs;
	EXPECT_EQ(bs.empty(), true);
	bs.push(5);
	EXPECT_EQ(bs.empty(), false);
	bs.push(6);
	bs.push(7);
	EXPECT_EQ(bs.peek(), 5);
	EXPECT_EQ(bs.pop(), true);
	EXPECT_EQ(bs.peek(), 6);
	bs.push(100);
	EXPECT_EQ(bs.peek(), 6);
	EXPECT_EQ(bs.pop(), true);
	EXPECT_EQ(bs.pop(), true);
	EXPECT_EQ(bs.pop(), true);
	EXPECT_EQ(bs.pop(), false);
	EXPECT_EQ(bs.pop(), false);
	EXPECT_EQ(bs.peek(), long long());
}
*/

/*
TEST(StackTest, StackTestCommon) {
	bla::stack<long long> bs;
	EXPECT_EQ(bs.empty(), true);
	bs.push(5);
	EXPECT_EQ(bs.empty(), false);
	bs.push(6);
	bs.push(7);
	EXPECT_EQ(bs.top(), 7);
	EXPECT_EQ(bs.pop(), true);
	EXPECT_EQ(bs.top(), 6);
	bs.push(100);
	EXPECT_EQ(bs.top(), 100);
	EXPECT_EQ(bs.pop(), true);
	EXPECT_EQ(bs.pop(), true);
	EXPECT_EQ(bs.pop(), true);
	EXPECT_EQ(bs.pop(), false);
	EXPECT_EQ(bs.pop(), false);
	EXPECT_EQ(bs.top(), long long());
}
*/

/*
TEST(DequeTest, DequeTestErase) {
	bla::deque<long long> dplus;
	dplus.insert(dplus.begin(), 10000);
	dplus.erase(dplus.end() - 1);
	ostringstream oss;
	oss << dplus;
	EXPECT_EQ(oss.str(), "");


	bla::deque<long long> d0;

	d0.insert(d0.begin(), 10000);
	for (int i = 0; i < 20; ++i) d0.push_back(i);
	for (int i = -1; i > -20; --i) d0.push_front(i);
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "-19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 10000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");

	d0.erase(d0.begin());
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "-18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 10000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");

	d0.erase(d0.end() - 1);
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "-18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 10000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ");

	d0.erase(d0.begin() + 18);
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "-18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ");

	d0.erase(d0.begin(), d0.begin() + 1);
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "-17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ");

	d0.erase(d0.end() - 1, d0.end());
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "-17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ");

	d0.erase(d0.begin() + 2, d0.begin() + 8);
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "-17 -16 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ");

	d0.erase(d0.begin() + 15, d0.begin() + 23);
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "-17 -16 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 12 13 14 15 16 17 ");

	d0.erase(d0.begin(), d0.end());
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "");
}
*/

/*
TEST(DequeTest, DequeTestDifficultAndInsert) {
	bla::deque<long long> d0;

	d0.insert(d0.begin(),10000);
	for (int i = 0; i < 20; ++i) d0.push_back(i);
	for (int i = -1; i > -20; --i) d0.push_front(i);
	ostringstream oss;
	oss << d0;
	EXPECT_EQ(oss.str(), "-19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 10000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");
	EXPECT_EQ(d0.size(), 40);
	EXPECT_EQ(d0[2] - d0[0], 2);
	EXPECT_EQ((d0.begin() + 8) - (d0.begin() + 4), 4);
	EXPECT_EQ((d0.end() - 1) - (d0.begin() + 4), 35);
	d0[0] = 100;
	d0[5] = 200;
	d0[30] = 400;
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "100 -18 -17 -16 -15 200 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 10000 0 1 2 3 4 5 6 7 8 9 400 11 12 13 14 15 16 17 18 19 ");

	d0.insert(d0.begin() + 5, -10000);
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "100 -18 -17 -16 -15 -10000 200 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 10000 0 1 2 3 4 5 6 7 8 9 400 11 12 13 14 15 16 17 18 19 ");

	d0.insert(d0.end() - 2, 666);
	oss.str("");
	oss << d0;
	EXPECT_EQ(oss.str(), "100 -18 -17 -16 -15 -10000 200 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 10000 0 1 2 3 4 5 6 7 8 9 400 11 12 13 14 15 16 17 666 18 19 ");

	bla::deque<long long> d1;
	d1.insert(d1.begin(), d0.begin(), d0.begin() + 5);
	oss.str("");
	oss << d1;
	EXPECT_EQ(oss.str(), "100 -18 -17 -16 -15 ");

	d1.insert(d1.begin() + 2, d0.begin(), d0.begin() + 3);
	oss.str("");
	oss << d1;
	EXPECT_EQ(oss.str(), "100 -18 100 -18 -17 -17 -16 -15 ");

	for (int i = 0; i < 8; ++i) {
		d1[i] = i;
	}
	oss.str("");
	oss << d1;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 ");

	d1.insert(d1.begin() + 5, d0.begin(), d0.begin() + 2);
	oss.str("");
	oss << d1;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 100 -18 5 6 7 ");

	d1.insert(d1.end(), d0.begin(), d0.begin() + 2);
	oss.str("");
	oss << d1;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 100 -18 5 6 7 100 -18 ");
}
*/

/*
TEST(DequeTest, DequeTestConstruction) {
	bla::deque<long long> d0;

	for (int i = 0; i < 20; ++i) d0.push_back(i);
	for (int i = -1; i > -20; --i) d0.push_front(i);
	ostringstream oss;
	oss << d0;
	EXPECT_EQ(oss.str(), "-19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");


	bla::deque<long long> d1;

	for (int i = 0; i < 10; ++i) d1.push_back(i);
	for (int i = -1; i > -10; --i) d1.push_front(i);
	oss.str("");
	oss << d1;
	EXPECT_EQ(oss.str(), "-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 ");

	bla::deque<long long> d2(d1);
	oss.str("");
	oss << d2;
	EXPECT_EQ(oss.str(), "-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 ");

	bla::deque<long long> d3 = d1;
	oss.str("");
	oss << d3;
	EXPECT_EQ(oss.str(), "-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 ");

	bla::deque<long long> d4;
	d4 = d1;
	oss.str("");
	oss << d4;
	EXPECT_EQ(oss.str(), "-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 ");

	bla::deque<long long> d5;
	for (int i = 0; i < 3; ++i) d5.push_back(i);
	for (int i = -1; i > -3; --i) d5.push_front(i);
	oss.str("");
	oss << d5;
	EXPECT_EQ(oss.str(), "-2 -1 0 1 2 ");

	d5 = d1;
	oss.str("");
	oss << d5;
	EXPECT_EQ(oss.str(), "-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 ");
}

TEST(DequeTest, DequeTestBasic) {
	bla::deque<long long> d1;
	EXPECT_EQ(d1.empty(), true);
	bla::dequeIterator<long long> iterd1 = d1.begin();
	bla::dequeIterator<long long> iterd2 = d1.end();
	EXPECT_EQ(iterd1 == iterd2, true);

	for (int i = 0; i < 10; ++i) d1.push_back(i);
	for (int i = -1; i > -10; --i) d1.push_front(i);

	ostringstream oss;
	oss << d1;
	EXPECT_EQ(oss.str(), "-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 ");
}
*/

/*
TEST(ListTest, ListTestSTDString) {
	bla::list<bla::_noTrivalClass> lin;
	EXPECT_EQ(lin.empty(), true);
	lin.push_back(bla::_noTrivalClass('f'));

	bla::list<std::string> li1;
	EXPECT_EQ(li1.empty(), true);
	ostringstream oss;
	oss << li1;
	EXPECT_EQ(oss.str(), "");

	li1.push_back(std::string("abcde"));
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "abcde ");
}
*/

/*
TEST(ListTest, ListTestPartOne) {
	bla::list<long long> li1;
	EXPECT_EQ(li1.empty(), true);
	ostringstream oss;
	oss << li1;
	EXPECT_EQ(oss.str(), "");

	li1.push_back(1);
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "1 ");

	li1.push_back(2);
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "1 2 ");

	li1.push_back(3);
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "1 2 3 ");
	EXPECT_EQ(li1.size(), 3);

	bla::list<long long> li2 = li1;
	oss.str("");
	oss << li2;
	EXPECT_EQ(oss.str(), "1 2 3 ");
	EXPECT_EQ(li2.size(), 3);

	bla::list<long long> li3(li1);
	oss.str("");
	oss << li3;
	EXPECT_EQ(oss.str(), "1 2 3 ");
	EXPECT_EQ(li3.size(), 3);

	bla::list<long long> li4;
	li4 = li1;
	oss.str("");
	oss << li4;
	EXPECT_EQ(oss.str(), "1 2 3 ");
	EXPECT_EQ(li4.size(), 3);

	bla::list<long long> li5;
	for (int i = 0; i < 5; ++i) li5.push_back(0);
	oss.str("");
	oss << li5;
	EXPECT_EQ(oss.str(), "0 0 0 0 0 ");
	EXPECT_EQ(li5.size(), 5);
	li5 = li1;
	oss.str("");
	oss << li5;
	EXPECT_EQ(oss.str(), "1 2 3 ");
	EXPECT_EQ(li5.size(), 3);

	li1.pop_back();
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "1 2 ");

	li1.pop_back();
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "1 ");

	li1.pop_back();
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "");
	EXPECT_EQ(li1.pop_back(), false);

	li2 = li1;
	oss.str("");
	oss << li2;
	EXPECT_EQ(oss.str(), "");
	EXPECT_EQ(li2.size(), 0);
}

TEST(ListTest, ListTestPartTwo) {
	bla::list<int> li1;
	li1.push_back(9);
	li1.push_back(8);
	li1.insert(li1.begin(), 6);
	ostringstream oss;
	oss << li1;
	EXPECT_EQ(oss.str(), "6 9 8 ");

	li1.insert(li1.end(), 7);
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "6 9 8 7 ");

	bla::list<int>::iterator iter1 = li1.begin();
	iter1++;
	iter1++;
	li1.insert(iter1, 0);
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "6 9 0 8 7 ");

	li1.erase(li1.begin());
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "9 0 8 7 ");

	iter1 = li1.end();
	iter1--;
	li1.erase(iter1);
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "9 0 8 ");

	iter1 = li1.begin();
	iter1++;
	li1.erase(iter1);
	oss.str("");
	oss << li1;
	EXPECT_EQ(oss.str(), "9 8 ");
}

TEST(ListTest, ListTestPartThree) {
	bla::list<int> li1;
	li1.push_back(9);
	li1.push_back(8);
	li1.insert(li1.begin(), 6);
	ostringstream oss;
	oss << li1;
	EXPECT_EQ(oss.str(), "6 9 8 ");

	bla::list<int> li2;
	li2.insert(li2.begin(), li1.begin(), li1.end());
	oss.str("");
	oss << li2;
	EXPECT_EQ(oss.str(), "6 9 8 ");

	li2.insert(li2.begin(), li1.begin(), li1.end());
	oss.str("");
	oss << li2;
	EXPECT_EQ(oss.str(), "6 9 8 6 9 8 ");

	bla::list<int>::iterator iter1 = li1.begin();
	iter1++;
	li2.insert(li2.begin(), li1.begin(), iter1);
	oss.str("");
	oss << li2;
	EXPECT_EQ(oss.str(), "6 6 9 8 6 9 8 ");

	bla::list<int>::iterator iter2 = li2.end();
	iter2--;
	EXPECT_EQ(iter2 - li2.begin(), 6);
	bla::list<int>::iterator iter2_2 = li2.begin() + 2;
	EXPECT_EQ(iter2 - iter2_2, 4);

	li2.erase(li2.begin(), iter2);
	oss.str("");
	oss << li2;
	EXPECT_EQ(oss.str(), "8 ");

	li2.erase(li2.begin(), li2.end());
	oss.str("");
	oss << li2;
	EXPECT_EQ(oss.str(), "");
}
*/

/*
TEST(VectorTest, VectorTestInconsistentCapacityPart) {
	bla::vector<int> v1;
	for (int i = 0; i < 20; ++i) {
		v1.push_back(i);
	}
	ostringstream oss;
	oss << v1;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");

	bla::vector<int> v2;
	for (int i = 0; i < 20; ++i) {
		if (i == 15)
			int b = 1;
		v2.insert(v2.begin(), 19 - i);
	}
	oss.str("");
	oss << v2;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");

	bla::vector<int> v3(v2);
	oss.str("");
	oss << v3;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");

	bla::vector<int> v4;
	v4 = v2;
	oss.str("");
	oss << v4;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ");

	bla::vector<int> v5;
	v5.insert(v5.begin(), v4.begin(), v4.end() - 2);
	oss.str("");
	oss << v5;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ");
}

TEST(VectorTest, VectorTestCommonArrayPart) {
	bla::vector<int> v;
	EXPECT_EQ(v.size(), 0) << "v size not zero";
	EXPECT_EQ(v.empty(), true) << "v not empty";
	v.push_back(1);
	v.insert(v.begin(), 2);
	v.insert(v.begin() + 1, 2);
	EXPECT_EQ(v.size(), 3) << "v size not three";
	bla::vector<int>::iterator iterv = v.begin();
	EXPECT_EQ(*iterv, 2) << "*iterv not 2";
	EXPECT_EQ(*(iterv + 1), 2) << "*(iterv+1) not 2";
	EXPECT_EQ(*(iterv + 2), 1) << "*(iterv+2) not 1";
	EXPECT_EQ(v[0], 2) << "v[0] not 2";
	EXPECT_EQ(v[1], 2) << "v[1] not 2";
	EXPECT_EQ(v[2], 1) << "v[2] not 1";
	v[1] = 999;
	EXPECT_EQ(v[1], 999) << "v[1] not 999";
	EXPECT_EQ(v.empty(), false) << "v is empty";

	EXPECT_EQ(*(bla::max(v.begin(), v.end())), 999);

	int ret = *(bla::max(v.begin(), v.end(), [](int le, int ri) {return le > ri; }));
	EXPECT_EQ(ret, 999);

	bla::vector<int> v2 = v;
	EXPECT_EQ(v2.size(), 3) << "v2 size not three";

	bla::vector<int> v3(v);
	EXPECT_EQ(v3.size(), 3) << "v3 size not three";

	bla::vector<int> v4;
	v4 = v;
	EXPECT_EQ(v4.size(), 3) << "v4 size not three";

	bla::vector<int> v5;
	v4 = v5;
	EXPECT_EQ(v4.size(), 0) << "v4 size not zero";
	v4 = v4;
	EXPECT_EQ(v4.size(), 0) << "v4 size not zero";

	bla::vector<int> v6;
	for (int i = 0; i < 10; ++i) {
		v6.push_back(i);
	}

	ostringstream oss;
	oss << v6;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 ") << "ostringstream << v6 not \"0 1 2 3 4 5 6 7 8 9 \"";

	bla::vector<int> v7;
	v7.push_back(-1);
	v7.insert(v7.begin(), v6.begin(), v6.begin() + 5);
	oss.str("");
	oss << v7;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 -1 ") << "ostringstream << v7 not \"0 1 2 3 4 -1 \"";

	v7.erase(v7.begin() + 2, v7.begin() + 4);
	oss.str("");
	oss << v7;
	EXPECT_EQ(oss.str(), "0 1 4 -1 ") << "ostringstream << v7 not \"0 1 4 -1 \"";

	bla::vector<int> v8;
	v8.push_back(-1);
	v8.push_back(-2);
	v8.insert(v8.begin() + 1, v6.begin(), v6.begin() + 1);
	oss.str("");
	oss << v8;
	EXPECT_EQ(oss.str(), "-1 0 -2 ") << "ostringstream << v8 not \"-1 0 -2 \"";

	v8.erase(v8.begin(), v8.end());
	oss.str("");
	oss << v8;
	EXPECT_EQ(oss.str(), "") << "ostringstream << v8 not \"\"";

	bla::vector<int> v9;
	v9.insert(v9.begin(), -8);
	v9.insert(v9.begin(), -7);
	v9.insert(v9.begin(), -6);
	v9.insert(v9.begin(), -5);
	v9.insert(v9.begin(), -4);
	v9.insert(v9.begin(), -3);
	v9.insert(v9.begin(), -2);
	v9.insert(v9.begin(), -1);
	v9.insert(v9.end() - 3, v6.begin() + 1, v6.begin() + 3);
	oss.str("");
	oss << v9;
	EXPECT_EQ(oss.str(), "-1 -2 -3 -4 -5 1 2 -6 -7 -8 ") << "ostringstream << v9 not \"-1 -2 -3 -4 -5 1 2 -6 -7 -8 \"";

	v9.erase(v9.begin() + 1, v9.end());
	oss.str("");
	oss << v9;
	EXPECT_EQ(oss.str(), "-1 ") << "ostringstream << v9 not \"-1 \"";
}
*/

/*
TEST(ArrayTest, CommonArrayTest) {
	bla::array<int, 3> b;
	EXPECT_EQ(b.size(), 0) << "b size not zero";
	EXPECT_EQ(b.empty(), true) << "b not empty";
	b.push_back(1);
	b.insert(b.begin(), 2);
	b.insert(b.begin() + 1, 2);
	EXPECT_EQ(b.size(), 3) << "b size not three";
	bla::array<int, 3>::iterator iterb = b.begin();
	EXPECT_EQ(*iterb, 2) << "*iterb not 2";
	EXPECT_EQ(*(iterb + 1), 2) << "*(iterb+1) not 2";
	EXPECT_EQ(*(iterb + 2), 1) << "*(iterb+2) not 1";
	EXPECT_EQ(b[0], 2) << "b[0] not 2";
	EXPECT_EQ(b[1], 2) << "b[1] not 2";
	EXPECT_EQ(b[2], 1) << "b[2] not 1";
	b[1] = 999;
	EXPECT_EQ(b[1], 999) << "b[1] not 999";
	EXPECT_EQ(b.empty(), false) << "b is empty";

	EXPECT_EQ(*(bla::max(b.begin(), b.end())), 999);

	int ret = *(bla::max(b.begin(), b.end(), [](int le, int ri) {return le > ri; }));
	EXPECT_EQ(ret, 999);

	bla::array<int, 3> b2 = b;
	EXPECT_EQ(b2.size(), 3) << "b2 size not three";

	bla::array<int, 3> b3(b);
	EXPECT_EQ(b3.size(), 3) << "b3 size not three";

	bla::array<int, 3> b4;
	b4 = b;
	EXPECT_EQ(b4.size(), 3) << "b4 size not three";

	bla::array<int, 3> b5;
	b4 = b5;
	EXPECT_EQ(b4.size(), 0) << "b4 size not zero";
	b4 = b4;
	EXPECT_EQ(b4.size(), 0) << "b4 size not zero";

	bla::array<int, 10> b6;
	for (int i = 0; i < 10; ++i) {
		b6.push_back(i);
	}

	ostringstream oss;
	oss << b6;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 5 6 7 8 9 ") << "ostringstream << b6 not \"0 1 2 3 4 5 6 7 8 9 \"";

	bla::array<int, 10> b7;
	b7.push_back(-1);
	b7.insert(b7.begin(), b6.begin(), b6.begin() + 5);
	oss.str("");
	oss << b7;
	EXPECT_EQ(oss.str(), "0 1 2 3 4 -1 ") << "ostringstream << b7 not \"0 1 2 3 4 -1 \"";

	b7.erase(b7.begin() + 2, b7.begin() + 4);
	oss.str("");
	oss << b7;
	EXPECT_EQ(oss.str(), "0 1 4 -1 ") << "ostringstream << b7 not \"0 1 4 -1 \"";

	bla::array<int, 10> b8;
	b8.push_back(-1);
	b8.push_back(-2);
	b8.insert(b8.begin() + 1, b6.begin(), b6.begin() + 1);
	oss.str("");
	oss << b8;
	EXPECT_EQ(oss.str(), "-1 0 -2 ") << "ostringstream << b8 not \"-1 0 -2 \"";

	b8.erase(b8.begin(), b8.end());
	oss.str("");
	oss << b8;
	EXPECT_EQ(oss.str(), "") << "ostringstream << b8 not \"\"";

	bla::array<int, 10> b9;
	b9.insert(b9.begin(), -8);
	b9.insert(b9.begin(), -7);
	b9.insert(b9.begin(), -6);
	b9.insert(b9.begin(), -5);
	b9.insert(b9.begin(), -4);
	b9.insert(b9.begin(), -3);
	b9.insert(b9.begin(), -2);
	b9.insert(b9.begin(), -1);
	b9.insert(b9.end() - 3, b6.begin() + 1, b6.begin() + 3);
	oss.str("");
	oss << b9;
	EXPECT_EQ(oss.str(), "-1 -2 -3 -4 -5 1 2 -6 -7 -8 ") << "ostringstream << b9 not \"-1 -2 -3 -4 -5 1 2 -6 -7 -8 \"";

	EXPECT_EQ(b9.insert(b9.end() - 3, b6.begin() + 1, b6.begin() + 3), false) << "b9 should cannot insert any thing";

	b9.erase(b9.begin() + 1, b9.end());
	oss.str("");
	oss << b9;
	EXPECT_EQ(oss.str(), "-1 ") << "ostringstream << b9 not \"-1 \"";
}
*/
